package b.utils.api

import akka.NotUsed
import com.lightbend.lagom.scaladsl.api.{Descriptor, Service, ServiceCall}

/**
  * 贲国称 于 2016/12/20 创建。
  */
trait T底层Service extends Service {

  def f申请流水号(id: String): ServiceCall[NotUsed, Long]
  def f申请多个流水号(id: String, several: Int): ServiceCall[NotUsed, Array[Long]]

  override def descriptor(): Descriptor = {
    import Service._
    named("UTILS").withCalls(
      pathCall("/utils/sequences/:id", f申请流水号 _),
      pathCall("/utils/sequences/:id/:several", f申请多个流水号 _)
    ).withAutoAcl(true)
  }

}
